package com.cloud.order.feign.fallback;
import java.math.BigDecimal;

import com.cloud.order.feign.ProductFeignClient;
import com.cloud.product.entity.Product;
import org.springframework.stereotype.Component;

/**
 * packageName com.cloud.order.feign.fallback
 *
 * @author yanshuanglong
 * @version JDK 8
 * @className ProductFeignClientFallback
 * @date 2025/3/18
 * @description TODO
 */
@Component
public class ProductFeignClientFallback implements ProductFeignClient {
    @Override
    public Product getProductById(Long id) {
        Product product = new Product();
        product.setId(id);
        product.setPrice(new BigDecimal("0"));
        product.setProductName("未知");
        product.setNum(0);

        return product;
    }
}
